myApp.factory('$style', ['$q', '$http', function($q, $http){
	var style = {
		allStyle: [{"name": "数据还没初始化！"}],
		loadAllStyle: function() {
			var defer = $q.defer();
			$http.get('searchAllStyle').then(function successCallback(response) {
				defer.resolve(response.data);
			}, function errorCallback(response) {
				console.log("fail：" + response);
			});
			return defer.promise;
		}
	}; 
	return style;
}]);